Programming Up to Congruence (Extended version)
نویسندگان
چکیده
This paper presents the design of ZOMBIE, a dependently-typedprogramming language that uses an adaptation of a congruenceclosure algorithm for proof and type inference. This algorithm al-lows the type checker to automatically use equality assumptionsfrom the context when reasoning about equality. Most dependently-typed languages automatically use equalities that follow from β-reduction during type checking; however, such reasoning is incom-patible with congruence closure. In contrast, ZOMBIE does not useautomatic β-reduction because types may contain potentially di-verging terms. Therefore ZOMBIE provides a unique opportunityto explore an alternative definition of equivalence in dependently-typed language design. Our work includes the specification of the language via a bidirec-tional type system, which works “up-to-congruence,” and an algo-rithm for elaborating expressions in this language to an explicitlytyped core language. We prove that our elaboration algorithm iscomplete with respect to the source type system, and always pro-duces well typed terms in the core language. This algorithm hasbeen implemented in the ZOMBIE language, which includes gen-eral recursion, irrelevant arguments, heterogeneous equality anddatatypes.
منابع مشابه
Up-To Techniques for Weighted Systems (Extended Version)
We show how up-to techniques for (bi-)similarity can be used in the setting of weighted systems. The problems we consider are language equivalence, language inclusion and the threshold problem (also known as universality problem) for weighted automata. We build a bisimulation relation on the fly and work up-to congruence and up-to similarity. This requires to determine whether a pair of vectors...
متن کاملTowards Machine-Checked Compiler Correctness for Higher-order Pure Functional Languages
In this paper we show that the critical part of a correct-ness proof for implementations of higher{order functional languages is amenable to machine{assisted proof. An extended version of the lambda-calculus is considered, and the congruence between its direct and continuation semantics is proved. The proof has been constructed with the help of a generic theorem prover | Isabelle. The major par...
متن کاملAlgorithms for Extended Alpha-Equivalence and Complexity
Equality of expressions in lambda-calculi, higher-order programming languages, higher-order programming calculi and process calculi is defined as alpha-equivalence. Permutability of bindings in let-constructs and structural congruence axioms extend alpha-equivalence. We analyse these extended alpha-equivalences and show that there are calculi with polynomial time algorithms, that a multiple-bin...
متن کاملFurther Formalization of the Process Algebra CCS in HOL4
In this project, we have extended previous work on the formalization of the process algebra CCS in HOL4. We have added full supports on weak bisimulation equivalence and observation congruence (rooted weak equivalence), with related definitions, theorems and algebraic laws. Some deep lemmas were also formally proved in this project, including Deng Lemma, Hennessy Lemma and several versions of t...
متن کاملComposing Strand Spaces
The strand space model for the analysis of security protocols is known to have some limitations in the patterns of nondeterminism it allows and in the ways in which strand spaces can be composed. Its successful application to a broad range of security protocols may therefore seem surprising. This paper gives a formal explanation of the wide applicability of strand spaces. We start with an exten...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014